﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Net;
using System.Net.Security;
using System.Security.Cryptography;
using System.Security.Cryptography.X509Certificates;
using Microsoft.Exchange.WebServices.Data;
namespace MsExchangeBcsConnector.ExchangeBdcModel
{
    public class MailFolder : SecureEntity
    {
        public string MailFolderID { get; set; }                
        public string Name { get; set; }

        public DateTime LastModifiedTime { get; set; }
        public long DeletedCount { get; set; }
           
        private string _Url = string.Empty;
        public string Url
        {
            get
            {
                return String.Format("http://fastdemo/_bdc/MsExchangeBcsConnector/Folder_1.aspx?EMail={0}&MailFolderId={1}",EMail,MailFolderID);
            }
            set
            {
                this._Url = value;
            }
        }

        
        #region Constructors

        // Empty constructors to support serialization
        public MailFolder() {
            this.LastModifiedTime = DateTime.Now;
            this.DeletedCount = 0;
            this.Name = string.Empty;
        }

        public MailFolder(string EMail, string FolderID) : this()
        {
            this.EMail = EMail;
            this.MailFolderID = FolderID;
        }

        #endregion
    }
}
